import React from 'react';
import ReactDOM from 'react-dom';
// import { renderRoutes } from "react-router-config";
import renderRoutes from './routes/renderRoutes';
import { BrowserRouter as Router } from 'react-router-dom';
import reportWebVitals from './reportWebVitals';
import { Provider } from 'react-redux';
import store from './store';
import routes from './routes';
import './index.css'

const authed = true;
const authPath = '/login' // 默认未登录的时候返回的页面

ReactDOM.render(
  // <React.StrictMode>
    <Provider store={store}>
      <Router>
        {renderRoutes(routes, authed, authPath)}
      </Router>
    </Provider>
  // </React.StrictMode>
  ,document.getElementById('root')
);

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();
